package com.ypd.show.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ypd.show.mapper.StatisticMapper;
import com.ypd.show.domain.Statistic;
import com.ypd.show.service.IStatisticService;

/**
 * 点击量操作Service业务层处理
 * 
 * @author ye
 * @date 2025-01-02
 */
@Service
public class StatisticServiceImpl implements IStatisticService 
{
    @Autowired
    private StatisticMapper statisticMapper;

    /**
     * 查询点击量操作
     * 
     * @param id 点击量操作主键
     * @return 点击量操作
     */
    @Override
    public Statistic selectStatisticById(Long id)
    {
        return statisticMapper.selectStatisticById(id);
    }

    @Override
    public Statistic selectStatisticByArticleId(Long articleId) {
        return statisticMapper.selectStatisticByArticleId(articleId);
    }

    /**
     * 查询点击量操作列表
     * 
     * @param statistic 点击量操作
     * @return 点击量操作
     */
    @Override
    public List<Statistic> selectStatisticList(Statistic statistic)
    {
        return statisticMapper.selectStatisticList(statistic);
    }

    /**
     * 新增点击量操作
     * 
     * @param statistic 点击量操作
     * @return 结果
     */
    @Override
    public int insertStatistic(Statistic statistic)
    {
        return statisticMapper.insertStatistic(statistic);
    }

    /**
     * 修改点击量操作
     * 
     * @param statistic 点击量操作
     * @return 结果
     */
    @Override
    public int updateStatistic(Statistic statistic)
    {
        return statisticMapper.updateStatistic(statistic);
    }

    /**
     * 批量删除点击量操作
     * 
     * @param ids 需要删除的点击量操作主键
     * @return 结果
     */
    @Override
    public int deleteStatisticByIds(Long[] ids)
    {
        return statisticMapper.deleteStatisticByIds(ids);
    }

    /**
     * 删除点击量操作信息
     * 
     * @param id 点击量操作主键
     * @return 结果
     */
    @Override
    public int deleteStatisticById(Long id)
    {
        return statisticMapper.deleteStatisticById(id);
    }
}
